package cn.edu.scau.cmi.chenruilin.simpleFactoryMethod;

import cn.edu.scau.cmi.chenruilin.domain.Beef;
import cn.edu.scau.cmi.chenruilin.domain.Chicken;
import cn.edu.scau.cmi.chenruilin.domain.Meat;
import cn.edu.scau.cmi.chenruilin.domain.Pork;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;

public class MeatFactory {

    @FXML
    private Label output;

    @FXML
    private Button chicken;

    @FXML
    private Button beef;

    @FXML
    private Button pork;

    @FXML
    public void createBeef() {
    	Meat meat = new Beef();
    	output.setText(meat.cook());
    }

    @FXML
    public void createPork() {
    	Meat meat = new Pork();
    	output.setText(meat.cook());
    }

    @FXML
    public void createChicken() {
    	Meat meat = new Chicken();
    	output.setText(meat.cook());
    }

}